<?php 
//验证
namespace app\modules\supplier\validate;
use think\Validate;
class SupplierApplyPost extends Validate{
  public $rule = [
    'supplier_name'  =>['require'],
    'charge'     =>['require'],
    'charge_phone'  =>['require', 'regex' => '/^1[3-5,7,8]{1}[0-9]{9}$/'],
    'username'  =>['require'],
//    'password'  =>['require'],
    'idcard'  =>['require', 'regex' => '/^(\d{15}$|^\d{18}$|^\d{17}(\d|X|x))$/'],
  ];

   public  $field = [
    'supplier_name'  =>'供应商名称',
    'charge'     =>'负责人',
    'charge_phone'  =>'负责人电话',
    'username'  =>'供应商用户账户',
//    'password'  =>'供应商用户密码',
    'idcard'  =>'负责人身份证号码',
  ];

}